/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package SensorCheckersImpl;

import SensorCheckerInterface.ISensorChecker;
import CommonValue.Pressure;
import DTO.SensorDTO;

/**
 *
 * @author Administrator
 */
public class PressureSensorChecker extends BaseSensorChecker implements ISensorChecker{

    public PressureSensorChecker() {
        setSensorCheckerSign(Pressure.SIGN);
    }

    @Override
    public boolean CheckSensor(SensorDTO o) {
        System.out.println("Check : "+getSensorCheckerSign());
        float pressure = o.getData().get(Pressure.PRESSURE);
        System.out.println(Pressure.PRESSURE + " : " + pressure);
        if (pressure < Pressure.PRESSURE_MIN || pressure > Pressure.PRESSURE_MAX) return false;
        return true;
    }
    
}
